1. Field of the Invention
This invention relates generally to a system and method for implementing cross-network synchronization of application software on a vehicle communications bus and, more particularly, to a system and method for providing cross-network coordination and migration of electronic control units from domain-based time partitioning to time-synchronized partitioning.
2. Discussion of the Related Art
A modern automobile has numerous electronic control units (ECUs) configured to control various vehicle subsystems, such as the engine, transmission, airbags, antilock braking, cruise control, electric power steering, audio systems, windows, doors and mirror adjustments. Some of these subsystems are independent, while others need to exchange data among themselves during the normal operation of the vehicle. For example, the engine needs to tell the transmission what the engine speed is, and the transmission needs to tell other modules when a gear shift occurs. This need to exchange data quickly and reliably led to the development of the vehicle bus, which is a specialized internal communications network that interconnects components inside a vehicle using a standard protocol.
One of the first and most widely established vehicle bus protocols is the Controller-area Network (CAN or CAN-bus), which is a multi-master broadcast serial bus standard designed to allow microcontrollers and devices to communicate with each other within the vehicle. Each node (i.e., ECU) on the CAN-bus is able to send and receive messages, but not simultaneously. A message consists primarily of an ID that represents the priority of the message, and is transmitted serially onto the bus. This mechanism is referred to as priority based bus arbitration. Messages with numerically smaller values of ID have higher priority and are transmitted first. Due to speed restrictions, the devices that are connected by a CAN network are typically sensors, actuators, and other control devices. These devices are not connected directly to the bus, but through a host processor and/or a CAN controller. Although extremely reliable and robust, the CAN-bus is an event-triggered protocol, which is not be well-suited for applications that require synchronization and higher speed performance.
Addressing many of these short-comings is the newer FlexRay standard, which is a time-triggered protocol that provides options for deterministic data that arrives in a predictable time frame (down to the microsecond) as well as provides for CAN-like dynamic event-driven data to handle a large variety of frames. FlexRay accomplishes this hybrid of core static frames and dynamic frames with a pre-set communication cycle that provides a pre-defined space for static and dynamic data. While CAN nodes only need to know the correct baud rate to communicate, nodes on a FlexRay network must know how all the pieces of the network are configured in order to communicate.
As with any multi-drop bus, only one node can electrically write data to the bus at a time. If two nodes attempt to write at the same time, contention on the bus occurs and data becomes corrupt. There are a variety of schemes used to prevent contention on a bus. As mentioned above, CAN employs an arbitration scheme where nodes will yield to other nodes if they see a message with higher priority being sent on a bus. While flexible and easy to expand, this technique does not allow for very high data rates and cannot guarantee timely delivery of data. FlexRay on the other hand, manages multiple nodes with a Time Division Multiple Access (TDMA) scheme. Every FlexRay node is synchronized to the same clock, and each node waits for its turn to write on the bus. Because the timing is consistent in a TDMA scheme, FlexRay is able to guarantee determinism and the consistency of data delivery to nodes on the network. This provides many advantages for systems that depend on up-to-date data between nodes.
All devices on a communications bus generally include an internal local clock having a counter and an oscillator. The oscillator periodically generates an event, known as a microtick, which increases the counter. The counter can be modified by an adjustment value to increase or decrease the speed of the local clock. In time-triggered systems such as FlexRay, actions (e.g., messages, command signals) are derived from a synchronized global notion of time that is established between all network nodes. The concept of time is characterized using microticks and macroticks, wherein microticks correspond to local oscillator ticks and macroticks represent the global notion of time used to trigger an action. Each node generates a macrotick by selecting a number of microticks and synchronizes its macrotick by dynamically increasing or decreasing the number of microticks per macrotick in accordance with a clock state correction term delivered periodically by a clock synchronization algorithm. All nodes on the network adjust their local clocks at the same point in global time. The internally synchronized global time proceeds in units of macroticks, the counter for which represents the node's view of the global time.
FlexRay provides a deterministic, fault-tolerant, high-speed bus system suitable for advanced control applications. The CAN-bus on the other hand provides a reliable, robust and low cost alternative suitable for most other vehicle controls systems. Given the broad implementation and significant legacy costs associated with the CAN-bus in existing vehicles, it's unlikely that FlexRay networks will displace CAN systems anytime soon. To optimize cost and reduce transition challenges, the next generation of automobiles will likely contain FlexRay for high-end applications and CAN for mainstream powertrain communications so that FlexRay and CAN co-exist on the vehicle bus.
The systems and methods described hereinafter were developed in an effort to optimize the co-existence of multiple vehicle bus protocols, and in particular, to achieve cross-network coordination and migration of ECUs from domain based partitioning to time synchronized partitioning.